export const UPDATE_MIBI = 'UPDATE_MIBI' //获取蜜币
export const UPDATE_JIFEN = 'UPDATE_JIFEN' //获取团购列表


export default{
    state:{
        mibi:{num:0},
        jifen:{vouchableQuantity:0,drawableQuantity:0} //vouchableQuantity 可抵用积分   drawableQuantity//可提现积分
    },
    mutations: {

        [UPDATE_MIBI](state, data) {
            state.mibi.num = data;
        },
        [UPDATE_JIFEN](state, data) {
            state.jifen[data.type] = data.content;
        },
    },
    actions: {
        [UPDATE_MIBI]({commit}, data){
            commit(UPDATE_MIBI, data)
        },
        [UPDATE_JIFEN]({commit}, data){
            commit(UPDATE_JIFEN, data)
        }
    }
}